package httpx

type LoginResult struct {
	Status           string `json:"status"`
	Type             string `json:"type"`
	CurrentAuthority string `json:"currentAuthority"`
}

type LoginParam struct {
	Username  string `json:"username"`
	Password  string `json:"password"`
	AutoLogin bool   `json:"autoLogin"`
	Type      string `json:"type"`
}

type Tags struct {
	Key   string `json:"key"`
	Label string `json:"label"`
}
type Province struct {
	Label string `json:"label"`
	Key   string `json:"key"`
}
type City struct {
	Label string `json:"label"`
	Key   string `json:"key"`
}
type Geographic struct {
	Province Province `json:"province"`
	City     City     `json:"city"`
}
type User struct {
	Name        string     `json:"name"`
	Avatar      string     `json:"avatar"`
	Userid      string     `json:"userid"`
	Email       string     `json:"email"`
	Signature   string     `json:"signature"`
	Title       string     `json:"title"`
	Group       string     `json:"group"`
	Tags        []Tags     `json:"tags"`
	NotifyCount int        `json:"notifyCount"`
	UnreadCount int        `json:"unreadCount"`
	Country     string     `json:"country"`
	Access      string     `json:"access"`
	Geographic  Geographic `json:"geographic"`
	Address     string     `json:"address"`
	Phone       string     `json:"phone"`
}

type Dashboard struct {
	Leader       string `json:"leader"`
	TotalCount   int    `json:"total_count"`
	SuccessCount int    `json:"success_count"`
	ErrorCount   int    `json:"error_count"`
}

func NewDashboard(leader string, totalCount int, successCount int, errorCount int) *Dashboard {
	return &Dashboard{Leader: leader, TotalCount: totalCount, SuccessCount: successCount, ErrorCount: errorCount}
}
